public class swap_nodes_in_pairs {
    public ListNode swapPairs(ListNode head) {
        if(head==null||head.next==null){
            return head;
        }
        ListNode newHead= head.next;
        head.next=swapPairs(newHead.next);
        newHead.next=head;
        return newHead;
    }
}
